{extend name="public/base"/}
{block name="body"}
<div class="main-box no-header clearfix">
	<header class="main-box-header clearfix">
		<div class="pull-left">
			<h2>{$meta_title}</h2>
		</div>

	</header>
	<div class="main-box-body clearfix">
		<div class="table-responsive">
      <div class="row">
  			<form method="get">
  				<div class="col-sm-12 col-md-4 col-lg-3">
  					<input type="text" class="form-control" name="keyword" value="" placeholder="请输入关键字">
  				</div>
  								<div class="col-sm-12 col-md-4">
  					<button class="btn btn-primary" type="submit">搜索</button>
  				</div>
  			</form>
  		</div>
      <table class="table table-striped table-hover">
        <thead>
          <tr>
            <th width="30"><input class="checkbox check-all" type="checkbox"></th>
            <th width="60">ID</th>
            <th>微信名</th>
            <th>记录</th>
						<th>时间</th>
						<th>状态</th>
          </tr>
        </thead>
        <tbody>
          {volist name="list" id="item"}
          <tr>
            <td><input class="ids row-selected" type="checkbox" name="ids[]" value="{$item['id']}"></td>
            <td>{$item['id']}</td>
            <td>
              {$item['user_id']|get_table_field="id","nickname","WxUser"}
            </td>
						<td>
              {$item['remark']}
            </td>
						<td>
              {$item['create_time']}
            </td>
						<td>

              <a href="{:url('toogleexchange',array('id'=>$item['id'],'value'=>abs($item['status']-1)))}"
                 class="ajax-get">
                 {if condition="$item['status'] eq '0'"}
                 <span class="label label-danger">未兑换</span>
                 {elseif condition="$item['status'] eq '1'"/}
                 <span class="label label-primary">已兑换</span>
                 {/if}
              </a>
            </td>

          </tr>
          {/volist}

        </tbody>
      </table>
      {$list->render()}
		</div>
	</div>
</div>



{/block}

{block name="script"}

{/block}
